package com.lookoutthebush.companyindex.dtos;

import com.lookoutthebush.companyindex.domain.UsersDO;
import com.lookoutthebush.companyindex.enums.UserRoleEnum;
import lombok.Data;
import lombok.Getter;

@Data
public class UsersDTO {
    private Long id;
    private String username;
    private String role;

    public UsersDTO(){}

    public UsersDTO(UsersDO usersDO){
        this.id = usersDO.getId();
        this.username = usersDO.getUsername();
        this.role = UserRoleEnum.getRoleByType(usersDO.getType());
    }
}
